﻿namespace UnityEngine
{
    using System;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;

    public class Renderer : Component
    {
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_lightmapTilingOffset(out Vector4 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_localToWorldMatrix(out Matrix4x4 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_worldToLocalMatrix(out Matrix4x4 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_set_lightmapTilingOffset(ref Vector4 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void Render(int material);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void SetPropertyBlock(MaterialPropertyBlock properties);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal extern void SetSubsetIndex(int index, int subSetIndexForMaterial);

        private Bounds _bounds;
        public Bounds bounds
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get { return _bounds; }
        }

        public bool castShadows
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public bool enabled
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public bool isPartOfStaticBatch
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
        }

        public bool isVisible
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
        }

        public int lightmapIndex
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public Vector4 lightmapTilingOffset
        {
            get
            {
                Vector4 vector;
                this.INTERNAL_get_lightmapTilingOffset(out vector);
                return vector;
            }
            set
            {
                this.INTERNAL_set_lightmapTilingOffset(ref value);
            }
        }

        public Transform lightProbeAnchor
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public Matrix4x4 localToWorldMatrix
        {
            get
            {
                Matrix4x4 matrixx;
                this.INTERNAL_get_localToWorldMatrix(out matrixx);
                return matrixx;
            }
        }

        public Material material
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public Material[] materials
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public bool receiveShadows
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public Material sharedMaterial
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public Material[] sharedMaterials
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        internal int staticBatchIndex
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
        }

        internal Transform staticBatchRootTransform
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public bool useLightProbes
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public Matrix4x4 worldToLocalMatrix
        {
            get
            {
                Matrix4x4 matrixx;
                this.INTERNAL_get_worldToLocalMatrix(out matrixx);
                return matrixx;
            }
        }
    }
}

